package com.codeavatar.hardwaretester.activity.hardware;

import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

import androidx.annotation.NonNull;

import com.codeavatar.catools.base.CaBaseActivity;
import com.codeavatar.catools.helper.CaActionBarHelper;
import com.codeavatar.hardwaretester.R;
import com.codeavatar.hardwaretester.databinding.ActivityWifiHomeBinding;

/**
 * +----------------------------------------------------------------------
 * | @Author: codeavatar   @Year：2022
 * +----------------------------------------------------------------------
 * | @Email: codeavatar@aliyun.com
 * +----------------------------------------------------------------------
 **/
public class WifiActivity extends CaBaseActivity {

    private final String TAG = this.getClass().getSimpleName();

    private ActivityWifiHomeBinding homeBinding;

    @Override
    protected void initBinding() {
        homeBinding = ActivityWifiHomeBinding.inflate(getLayoutInflater());
    }

    @Override
    protected View getLayoutView() {
        return homeBinding.getRoot();
    }

    @Override
    protected void initNavigation() {
        CaActionBarHelper.init().toolbar(getSupportActionBar(),"蓝牙");
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initEvent() {

    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View v) {

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.bluetooth_home_menu,menu);
        return super.onCreateOptionsMenu(menu);
    }

    @Override
    public boolean onOptionsItemSelected(@NonNull MenuItem item) {
        int itemId = item.getItemId();
        if(android.R.id.home == itemId){
            this.finish();
        }else if(R.id.action_start_server == itemId){
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}
